function ChartStyle(){
    Highcharts.createElement('link', {
        href: '#',
        rel: 'stylesheet',
        type: 'text/css'
    }, null, document.getElementsByTagName('head')[0]);
    var base_color = "#fafafa";
    var base_font_size = "12px";

    Highcharts.theme = {
        colors: ["#8085e9", "#f7a35c", "#90ed7d", "#7cb5ec", "#aaeeee", "#ff0066", "#eeaaee",
            "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
        chart: {
            marginTop: 30,
            backgroundColor: {
                linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
                stops: [            //设定图表的背景色(渐变色)
                    [0, 'rgba(0,0,0,0)'],
                    [1, 'rgba(0,0,0,0)']
                ]
            },
            style: {
                fontFamily: "sans-serif"    //设定字体样式
            },
            plotBorderColor: '#606063'
        },
        title: {
            style: {
                color: '#fafafa',
                textTransform: 'normal',    //字符转换, 可能的值有: normal, uppercase, lowercase
                fontSize: base_font_size
            }
        },
        subtitle: {
            style: {
                color: '#E0E0E3',
                textTransform: 'normal'
            }
        },
        xAxis: {
            gridLineColor: '#707073',

            //labels: {
            //    formatter: function() {
            //        //获取到刻度值
            //        var labelVal = this.value;
            //        //实际返回的刻度值
            //        var reallyVal = labelVal;
            //        //判断刻度值的长度
            //        if(labelVal.length > 4)
            //        {
            //            //截取刻度值
            //            reallyVal = labelVal.substr(0,4)+"<br/>"+labelVal.substring(4,labelVal.length-1);
            //        }
            //        return reallyVal;
            //    }
            //},



            labels: {
                enabled: false,
                style: {
                    fontSize: '10px',
                    color: '#fff'
                }
            },
            lineColor: '#707073',
            minorGridLineColor: '#505053',
            tickColor: '#707073',
            title: {
                style: {
                    fontSize: base_font_size,
                    color: '#A0A0A3'

                }
            }
        },
        yAxis: {
            gridLineColor: '#707073',
            labels: {
                style: {
                    fontSize: base_font_size,
                    color: '#E0E0E3'
                }
            },
            lineColor: '#707073',
            minorGridLineColor: '#505053',
            tickColor: '#707073',
            tickWidth: 1,
            tickPixelInterval: 40,      //如果刻度间隔为null，这个选项可以给刻度线设置一个大致的像素间隔值。不适用于分类轴。默认Y轴为72, X轴为100。
            title: {
                style: {
                    fontSize: base_font_size,
                    color: '#A0A0A3'
                }
            }
        },
        tooltip: {
            backgroundColor: 'rgba(0, 0, 0, 0.85)',
            style: {
                fontSize: base_font_size,
                color: '#F0F0F0'
            }
        },
        plotOptions: {
            series: {
                dataLabels: {
                    fontSize: base_font_size,
                    color: '#B0B0B3'
                },
                marker: {
                    enabled: false, //去掉线条上的圆点或方型
                    lineColor: '#333'
                }
            },
            boxplot: {
                fillColor: '#505053'
            },
            candlestick: {
                lineColor: 'white'
            },
            errorbar: {
                color: 'white'
            }
        },
        legend: {
            layout: 'horizontal',        //水平/垂直布局, 默认为水平: horizontal, vertical
            verticalAlign: 'top',       //legend放置的位置: left, right, top, bottom
            align: 'center',              //legend对齐方式, 四种: left, right, center,
            enabled: false,             //显示/隐藏 各分类名称
            floating: false,           //默认为false, legend不可以在数据图表之上.
            //x: 90,
            y: -15,
            itemStyle: {
                fontSize: base_font_size,
                color: '#E0E0E3'
            },
            itemHoverStyle: {
                color: '#FFF'
            },
            itemHiddenStyle: {
                color: '#606063'
            }
        },
        credits: {
            enabled: false, //显示或隐藏版权信息
            style: {
                color: '#666'
            }
        },
        labels: {
            style: {
                color: '#707073'
            }
        },

        drilldown: {
            activeAxisLabelStyle: {
                color: '#F0F0F3'
            },
            activeDataLabelStyle: {
                color: '#F0F0F3'
            }
        },

        navigation: {
            buttonOptions: {
                symbolStroke: '#DDDDDD',
                theme: {
                    fill: '#505053'
                }
            }
        },

        // scroll charts
        rangeSelector: {
            buttonTheme: {
                fill: '#505053',
                stroke: '#000000',
                style: {
                    color: '#CCC'
                },
                states: {
                    hover: {
                        fill: '#707073',
                        stroke: '#000000',
                        style: {
                            color: 'white'
                        }
                    },
                    select: {
                        fill: '#000003',
                        stroke: '#000000',
                        style: {
                            color: 'white'
                        }
                    }
                }
            },
            inputBoxBorderColor: '#505053',
            inputStyle: {
                backgroundColor: '#333',
                color: 'silver'
            },
            labelStyle: {
                color: 'silver'
            }
        },

        navigator: {
            handles: {
                backgroundColor: '#666',
                borderColor: '#AAA'
            },
            outlineColor: '#CCC',
            maskFill: 'rgba(255,255,255,0.1)',
            series: {
                color: '#7798BF',
                lineColor: '#A6C7ED'
            },
            xAxis: {
                gridLineColor: '#505053'
            }
        },

        scrollbar: {
            barBackgroundColor: '#808083',
            barBorderColor: '#808083',
            buttonArrowColor: '#CCC',
            buttonBackgroundColor: '#606063',
            buttonBorderColor: '#606063',
            rifleColor: '#FFF',
            trackBackgroundColor: '#404043',
            trackBorderColor: '#404043'
        },

        // special colors for some of the
        legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
        background2: '#505053',
        dataLabelsColor: '#B0B0B3',
        textColor: '#C0C0C0',
        contrastTextColor: '#F0F0F3',
        maskColor: 'rgba(255,255,255,0.3)'
    };
    // Apply the theme
    Highcharts.setOptions(Highcharts.theme);
}